package edu.umassd.raddacl;

import java.util.Collection;

import org.springframework.beans.factory.annotation.Autowired;

import edu.umassd.raddacl.steps.Preclustering;

/**
 * A clustering algorithm that takes in a DataSet and produces a set of cluster
 * results.
 * 
 * @author Dan Avila
 * 
 */
public class RADDACL
{
	@Autowired
	private Preclustering preclustering;

	/**
	 * Generates a collection of clusters.
	 * 
	 * @param set
	 *            - the data set we are clustering.
	 * @return the resulting clusters.
	 */
	public Collection<Cluster> getClusters(DataSet set)
	{
		Cluster dataSetCluster = set.toCluster();

		preclustering.perform(dataSetCluster);

		return preclustering.getPreClusters();
	}
}
